package com.hemaapp.yjnh.bean;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

import xtom.frame.XtomObject;
import xtom.frame.exception.DataParseException;

/**
 * 类描述：商品属性
 * 创建人：GuiyouZhang
 * 创建时间：2016/8/12 13:49
 * 修改备注：
 */
public class AttributeItems  extends XtomObject implements Serializable {
    private String id;// 主键id
    private String blog_id;// 商品id
    private String name;// 属性名称
    private String content;// 属性内容
    private String orderby;// 排序规则

    public AttributeItems(JSONObject jsonObject) throws DataParseException {
        if (jsonObject != null) {
            try {
                id = get(jsonObject, "id");
                blog_id = get(jsonObject, "blog_id");
                name = get(jsonObject, "name");
                content = get(jsonObject, "content");
                orderby = get(jsonObject, "orderby");

            } catch (JSONException e) {
                throw new DataParseException(e);
            }
        }
    }

    public String getid() {
        return id;
    }

    public String getblog_id() {
        return blog_id;
    }

    public String getcontent() {
        return content;
    }

    public String getname() {
        return name;
    }

    public String getorderby() {
        return orderby;
    }
}
